package com.wencai.util;

/**
 * @author wangpan
 * @date 2023/5/13
 */
public class BuyStrategy {
    private double value;
    private BuyStrategyType buyStrategyType;

    public static BuyStrategy getDefault() {
        return new BuyStrategy();
    }

    public BuyStrategy() {
        this.value = -1;
        this.buyStrategyType = BuyStrategyType.NORMAL;
    }

    public BuyStrategy(double value, BuyStrategyType buyStrategyType) {
        this.value = value;
        this.buyStrategyType = buyStrategyType;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public BuyStrategyType getBuyStrategyType() {
        return buyStrategyType;
    }

    public void setBuyStrategyType(BuyStrategyType buyStrategyType) {
        this.buyStrategyType = buyStrategyType;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("BuyStrategy{");
        sb.append("value=").append(value);
        sb.append(", buyStrategyType=").append(buyStrategyType);
        sb.append('}');
        return sb.toString();
    }
}
